测试链接：https://leetcode.cn/problems/find-minimum-in-rotated-sorted-array/
class Solution {
public:
    int findMin(vector<int>& nums) {
        if(0 == nums.size()) return 0;
        if(1 == nums.size()) return nums[0];

        int l = 0;
        int r = nums.size() - 1;
        int x = nums[r];

        while(l < r)
        {
            int mid = l + (r - l)/2;
            if(nums[mid] > x)
            {
                l = mid + 1;
            }
            else
            {
                r = mid;
            }
        }

        return nums[l];
    }
};